/**
 * 涉税查询 > 缴费情况查询
 * @author 程文智
 */
package com.taxsystem.chengwenzhi.sscx;

import java.util.ArrayList;
import java.util.HashMap;

import android.app.ActionBar;
import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.main.taxsystem.R;

public class JfqkcxActivity extends Activity {
	private ListView listView = null;
	private ArrayList<HashMap<String,String>> list = null;
	private SimpleAdapter adapter = null;
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_jfqkcx);
		
		ActionBar bar = getActionBar();
        bar.setHomeButtonEnabled(true);
        bar.setIcon(R.drawable.actionbar_icon);
        bar.setDisplayHomeAsUpEnabled(true);
        bar.setBackgroundDrawable(new ColorDrawable(0xff34a4f7));
		
		listView = (ListView) this.findViewById(R.id.listView);
		list = new ArrayList<HashMap<String,String>>();
		adapter = new SimpleAdapter(JfqkcxActivity.this,
				list,
				R.layout.activity_jfqkcx_list_item,
				new String[]{
				"gljgdm","jkfsdm","yhdm","yhzh",
				"jkje","qqsj","jklsh"
		},
		new int[]{
				R.id.jfqkcx_listItem_gljgdm,
				R.id.jfqkcx_listItem_jkfsdm,
				R.id.jfqkcx_listItem_yhdm,
				R.id.jfqkcx_listItem_yhzh,
				R.id.jfqkcx_listItem_jkje,
				R.id.jfqkcx_listItem_qqsj,
				R.id.jfqkcx_listItem_jklsh
		});
		
		buildTestData();
		
		listView.setAdapter(adapter);
	}

	private void buildTestData(){
		HashMap<String,String> map = null;
		map = new HashMap<String,String>();
		map.put("gljgdm", "广州市天河区地方税务局税源管理七科");
		map.put("jkfsdm", "ETS缴款");
		map.put("yhdm", "中国建设银行广州分行");
		map.put("yhzh", "4400158050705");
		map.put("jkje", "3880.25");
		map.put("qqsj", "2014-04-10");
		map.put("jklsh", "3201404168832893");
		list.add(map);
		
		map = new HashMap<String,String>();
		map.put("gljgdm", "广州市天河区地方税务局税源管理七科");
		map.put("jkfsdm", "ETS缴款");
		map.put("yhdm", "中国建设银行广州分行");
		map.put("yhzh", "4400158050705");
		map.put("jkje", "204.55");
		map.put("qqsj", "2014-04-10");
		map.put("jklsh", "3201404168832894");
		list.add(map);
	}

}
